package business.application.test_bed;

import org.kth.dks.JDHT;

public class Client {
	
	/**
	 * @param args contains a reference to an existing node in a DHT 
	 */
	public static void main(String[] args) {
		if (args.length!=1) System.exit(0); 
		try {
			// Start an instance listening on port 5550
			// Connect to an existing node running a DHT at args[0]
			JDHT myDHT = new JDHT(5550, args[0]);
			
			myDHT.put("someTest", "supaTest");
			
			String helloString = (String) myDHT.get("someTest");
			System.out.println(helloString);
			
			myDHT.close();
			
		} catch (Exception e) { e.printStackTrace(); }
		
	}
	
}
